<!--
  Generated template for the DatePickerPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>日期选择</ion-title>
    <ion-buttons end *ngIf="showYearSelect">
      <button ion-button (click)="showRadio()">{{today.year}}年</button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content>
  <ion-header class="week" ion-fixed>
    <div class="week-detail" *ngFor="let item of week" [ngStyle]= "{color:item.color}">{{item.name}}</div>
  </ion-header>
  <ng-container *ngIf="didLoad">
    <div class="picker-container" *ngFor="let item of month">
      <div class="picker-header">{{today.year}}年{{item.name}}</div>
      <div  class="picker-content">
        <button tappable class="day" id="{{today.year+'|'+item.value+'|'+day.name}}" *ngFor="let day of days[item.value-1].days" (click)="chooseDate(today.year,item.value,day,today.year+'|'+item.value+'|'+day.name)">
          <div tappable class="text-small live-in"> </div>
          <div tappable>{{day.name}}</div>
          <div tappable class="text-small check-out"> </div>
        </button>
      </div>
    </div>
  </ng-container>

</ion-content>
